package design.pattern.Decorator.inter.impl;

import design.pattern.Decorator.inter.BasicDecorator;

public abstract class WrapperHandleDecorator<R> implements BasicDecorator<R> {
  private final BasicDecorator<R> decorator;
  
  public WrapperHandleDecorator(BasicDecorator<R> decorator) {
    this.decorator = decorator;
  }
  
  @Override
  public void operate(R data) {
    // 只是调用 关联的 operate 操作
    this.decorator.operate(data);
  }
}
